//{====================================================================================
//! @file Var2taskAotv.c
//! @date    2013-09-29 20:57
//! @author Andrianov Georgiy <egor.andrianov81@gmail.com>
//!
//! Programm transpose matrix
//!
//! @par The programm enters size of matrix and matrix
//!      The programm outputs transpose of matrix
//}====================================================================================

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>

int main()
{
    int n = 0, i = 0, j = 0;
    scanf("%i", &n);
    int** matrica = (int*)malloc(n * sizeof(int));
    assert(matrica != NULL);
    for (i = 0; i < n; i++)
    {
        matrica[i] = (int*)malloc(n * sizeof(int));
        assert(matrica[i] != NULL);
    }
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
        {
            scanf("%i", &matrica[j][i]);
        }
    }
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
        {
            printf("%i ", matrica[i][j]);
        }
    printf("\n");
    }
    return 0;
}
